using System.Collections;
using System.Collections.Generic;

namespace VirtualDeveloper.Filters
{
    internal class RoundRobinEnumerable<T> : IEnumerable<T>
    {
        private readonly IEnumerable<T> list;

        public RoundRobinEnumerable(IEnumerable<T> list)
        {
            this.list = list;
        }

        public IEnumerator<T> GetEnumerator()
        {
            return new RoundRobinEnumerator<T>(list);
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }
    }
}